<!-- 新闻 详情 -->
<template>
	<view class="container">
		<view class="box">
			<view class="titleBox text-xl text-black text-bold">{{getData.noticeTitle}}</view>
			<view class="timeBox text-df text-gray margin-top-sm margin-bottom-sm">{{getData.createTime}}</view>
		</view>
		<u-parse :html="getData.noticeContent" :show-with-animation="true" :tag-style="style" :lazy-load="true"
			:loading-img="true" style="padding: 20px;background-color: #fff;"></u-parse>
		<view class="safe-area-inset-bottom"></view>
	</view>
</template>

<script>
	import {
		getNoticeById
	} from '../../common/api/notice.js'
	export default {
		data() {
			return {
				scrollTop: 0,
				old: {
					scrollTop: 0
				},
				getData: {
					noticeTitle:''
				},
				content: '',
				style: {
					p: 'line-height:54rpx;font-size:32rpx;'
				}
			}
		},
		onLoad(option) {
			console.log(option)
			this.getDataFun(option.noticeId);
		},
		methods: {
			getDataFun(noticeId) {
				getNoticeById(noticeId).then(res => {
					this.getData = res[1].data.data
					console.log(this.getData);
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	button::after {
		border: none;
		background: transparent;
	}

	.container {
		background-color: #fff;
		width: 750rpx;

		.box {
			padding: 30rpx;
			padding-bottom: 0;
		}
	}

	image {
		width: 750rpx;
	}
</style>
